<?php 

 if( Auth::check() ) {
 	$followActive = Followers::where( 'follower', Auth::user()->id )
			 ->where( 'following', $user->id )->where('status',1)->first(); 
			 
       if( $followActive ) {
       	  $textFollow   = Lang::get('users.following');
		  $icoFollow    = '-ok';
		  $activeFollow = 'follow_active activeFollow';
       } else {
       		$textFollow   = Lang::get('users.follow');
		    $icoFollow    = '-plus';
			$activeFollow = '';
       }
	   
	   $user_blocked = DB::table('block_user')
	   ->where('user_id',Auth::user()->id)
	   ->where('user_blocked',$user->id)
	   ->orWhere('user_id',$user->id)
	   ->where('user_blocked',Auth::user()->id)
	   ->first();
	   
	   $unblock = DB::table('block_user')
	   ->where('user_id',Auth::user()->id)
	   ->where('user_blocked',$user->id)
	   ->first();
	   
 }//<<<<---- Auth
?>
<?php $__env->startSection('jumbotron'); ?>
<div class="jumbotron static-header-profile jumbotron-cover" style="background: url('<?php echo URL::asset("public/cover/$user->cover"); ?>') no-repeat center center #000; background-size: cover;">
      <div class="container wrap-jumbotron">
      	
      	<div class="media media-static-header">
      		<div class="pull-left">
      		<a href="<?php echo URL::to('@'); ?><?php echo $user->username; ?>">
        		<img src="<?php echo URL::asset('public/avatar').'/'.$user->avatar; ?>" width="110" height="110" class="img-circle border-avatar-profile" />
        		</a> 
      		</div>
      		
      		<div class="media-body none-overflow">
		      	<h1 class="title-item none-overflow media-heading">
		        	<a href="<?php echo URL::to('@'); ?><?php echo $user->username; ?>" class="linkUser">
		        		<?php echo e( $user->name ); ?>

		        		</a> 
		        		<?php if($user->type_account == 2 ): ?> 
			      		<span class="label pro-badge"><?php echo Lang::get('misc.pro'); ?></span>
			      		<?php endif; ?>
			      		
			      		<?php if($user->type_account == 3 ): ?> 
			      		<span class="label team-badge"><?php echo Lang::get('misc.team'); ?></span>
			      		<?php endif; ?>
		        	</h1>
		        	
		        <div class="btn-block">
		        	 <?php if( Auth::check() ): ?>
		        	 
		        	 <?php if( $user->id != Auth::user()->id ): ?>
		        	 
		        	 <?php if( !$user_blocked ): ?>
				        <button type="button" class="btn btn-default btn-follow-lg btn-sm add-button followBtn <?php echo $activeFollow; ?>" data-id="<?php echo $user->id; ?>" data-follow="<?php echo Lang::get('users.follow'); ?>" data-following="<?php echo Lang::get('users.following'); ?>">
		      				<i class="glyphicon glyphicon<?php echo $icoFollow; ?> myicon-right"></i> <?php echo $textFollow; ?>

		      			</button>
		      			<?php endif; ?> <?php /* User Blocked */ ?>
		      			
	<?php if( isset( $unblock ) ): ?>
      			<a href="javascript:void(0);" data-id="<?php echo $user->id; ?>" class="btn btn-default btn-follow-lg btn-sm" id="unblock">
      				<i class="glyphicon glyphicon-eye-close myicon-right"></i> <?php echo Lang::get('users.unblock'); ?>

      				</a>
      <?php endif; ?>
		      			
		      		<?php else: ?> 
		      			
		      			<a href="<?php echo URL::to('account'); ?>" class="btn btn-default btn-follow-lg btn-sm">
		      				<i class="icon-pencil2 myicon-right"></i> <?php echo Lang::get('users.edit_profile'); ?>

		      			</a>
		      			
		      			<?php endif; ?>
		      			<?php /* End user distinct Auth */ ?>
		      			
		      			<?php else: ?>
		      			<button type="button" class="btn btn-default btn-follow-lg btn-sm add-button">
		      				<i class="glyphicon glyphicon-plus myicon-right"></i> <?php echo Lang::get('users.follow'); ?>

		      				</button>
		      			
		      			<?php endif; ?>
		      			<?php /* End Auth */ ?>
		        	</div>
      		</div>
      	</div>

       </div>
    </div>
    
    <?php echo $__env->make('includes.menu-user', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    
  <?php $__env->stopSection(); ?>